<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "park_current".
 *
 * @property string $id
 * @property string $start_time
 *
 * @property ParkCurrentSpace[] $parkCurrentSpaces
 */
class ParkCurrent extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'park_current';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['start_time'], 'safe'],
            [['id'], 'string', 'max' => 50],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '唯一标识',
            'start_time' => '创建日期',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getParkCurrentSpaces()
    {
        return $this->hasMany(ParkCurrentSpace::className(), ['park_current_id' => 'id']);
    }
}
